package com.itpan.Mapper;

import com.itpan.Entity.Customer;
import com.itpan.Entity.Product;
import com.itpan.Entity.PurchaseOrderDetail;
import com.itpan.Entity.StatsByT;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

@Mapper
public interface PurchaseOrderDetailMapper {

    List<PurchaseOrderDetail> getall();

    List<PurchaseOrderDetail> getallPage(RowBounds rowBounds);



    PurchaseOrderDetail getById(@Param(value = "Id") Long Id);


    List<PurchaseOrderDetail> getbyMutil(PurchaseOrderDetail purchaseOrderDetail);

    void addOne(PurchaseOrderDetail purchaseOrderDetail);

    void addAll(@Param(value = "list") List<PurchaseOrderDetail> list);

    void updateCustomerByID(PurchaseOrderDetail purchaseOrderDetail);

    void deleteById(@Param(value = "Id") Long Id);


    List<PurchaseOrderDetail> getMainPurchaseorder(@Param("Id") Long Id);


    List<PurchaseOrderDetail> getProductByPId(@Param("Id") String Id);


    List<StatsByT> getSumofQuantityToproduct();


    List<StatsByT> getnumbercountOrder();


    List<StatsByT> getavgpricebyproduct();
}
